implemented function pointers for gamestate changes