Finally finished the remove function