Solutions from rubymonk.com