finalized version with player id list