childSpawner function