Implements 'multirember' function