refactor spawner a bit