improved clipping