Delete function now works