Rewrote Delete Function