generate proper path structure