added code for service hook and to simulate a game