revise objects and types in wgen module
implement query generator