update _clamp functions