test cases modified accordingly