completed my_solution.rb