Uses range form in loops