dealing with branch deletion