updated with leaf nodes