generates code for all objects
works!