refactored month and year class