some checks for delete button