re-implement directory restructuring