fixed sample code, added some more usage information