clamping of values