Delete function is working