added check for leap year