Added structure to maxplayer function