work on file tree function