added tests; fixed isClippingRequired