edited and completed eexercise6 ruby file