Added more test cases for helper functions