added changes for spawning monsters