added leap year check