adding clipping logic