handle game in db