added sleep 0.5 to delay API call