added more unit test cases for modified method