migrated game logic to seperate thread