refactor new game ajax callback