refactored type/category creation