root node layout function