starting to make the code to generate in place