add able to get dom branch structure into array