5th Exercise from RubyMotion book