refactor the code; Iterator for players