added game loop, updated database