Changing the time based spawning logic to Pattern based