loop counter has been chnaged