implementing remove all functions