builds a file tree