Category functions and some test cases