modified test_CW