added in code to change spawnrate based on time