factorcheck routine and test for twisted qz