added code to do parallel download