Prepare for generator