successfully printing the month calendar, but needs refactoring