added clipping feature