relocated i+=1