18th exercise of ruby