deleteRecord debugged