implementation of delete button