simplify nodeStr function