reading directory structure