Updated to include voltage clamping