moved out some methods to gamemode.java