added some test case code and comments