added some helper-functions for handling gamestate