working except have problem with playerid assignment