refactored createCalendar method to use date object
cleaned up unused variables