implemented the remove record