dir struct re-factory