I would suggest .to_i as you don't need a float. (this might require line 25 to need a .to_i)