implementing remove(element)