added comments and modified test case