added some code for handling specific instructions in generator