working framework with new tree. have to use vector instead of direct access