Third exercise of ruby