pre edit/delete functionality