proper ordering of nodes