adding more functionnality to player sample