added logic that handles already existing game ids