other performance tweak at loop function at other classes