clamp some input