added verification before edit and delete