Wrote a remove function