expanded spawning section, added termination section