added codes to check the year