increment i in loop