implementation of gameManager (not finished yet)