modified quotient ring test (should be more general now ,since qring type will be removed in future)