Use currentGameId as local variable
Use map for array
Add callback function