create a method for downloading data