refactored for readability
leapyear version 1