loop range adjustment