refactoring and creating instance methods of Month class