add test for category function