first version of downloading files works