spawning code works