added player tracking logic