spawn code

adds in spawn code