removed getDaysInMonth function