initial code of game controller