added clipping for debugging