J.W. added test cases for q1