changed key.to_i.even? to key.even?
sum time added