file tree implementation