Updated the file with comments and added a new testcase.