refactor code into asking user to put in the code to play with friends