reduced directory tree element creation code