Habits (Extended version)