remove +1 to the numnodes for the empty node