replace auto by iterator