Added comments and modified the test cases