fixed monthdelta function