my solutions for http://chimera.labs.oreilly.com/books/1234000000726