New implementation of random spawning