moves js to seperate file for game setup page