re #53 started back to work on this issue, added generated code