Implemented clipping via substitution