exercises from http://ruby.learncodethehardway.com/book/ex1.html