update downloading logic