Added more methods and corresponding test cases.