break out path building logic to methods
extract path building to a method