added sample app, fixed codegen