How to use "habit" in a sentence

Sentences

Without success, Tina had tried to break him of that bad habit.

"If Joel's right - and I'm sure he is - then it's best to get in the habit of staying away right from the start."