updated task2.rb