Delete function now working