ruby for prob 4