Make correct structure with categories