making it work with golang cookbook 1.4.0