That is the main reason that God has prescribed fasting, so you will not only fast from food, drink and sex between married couples during the fasting hours, but also fast from bad habits such as smoking, cursing, lying, gossiping and any other negative thoughts and behavior.