almost finished gameLogic