modify download algorithm  for remote picture