simplify category building a little bit