branch graph now takes data from nodes array and tree array