new function for downloading packages