Craving Turns a Loop Into a Habit