finished the code for controlling the speed of monsters