Added a clamp function