works for basic test case