adding a basic consumer test
formatting doc as code
adding error handling to docs