generate directory tree