reformat the directory