Added clamp method