completed exercise2 ruby file