Use range for instead of for