defined structure of output; added log for n_cats_used filted