data gathered for branch diagram but problem in branch switching