Clamp function added.