test case + minor modifications