update the structure of directory