implemented deleteRecord