converting code to use the new simpler path building