separeted game logic from gui