Project 3 done in Ruby