updating model after deleting node