refactor and add faulty test

define method to allow for testing
define array to improve efficiency
use method each_with_index
refactor leap_year

remove unnecessary 'true' and 'false' in conditionals
use loop do instead of while loop
allow for negative years
add year validation to leap_year? using return string to flag invlid year