prepare for generator