implemented downloading of directories