added a join game function