refactored and fixed multiple player name problem