created joinGame method