handle root node
use named functions