Added basic function to collect categories.