rebuilding the directory