Technology could help patients kick bad habits