Creating a removing function