added method for downloading files