Added spawning functionality