better way to assemble path

better way to assemble path