going to use unique node factory so converting code to use java API