spawning code written