rework categories implementation