sped up sampling of categories considerably by not computing total likelihood for every category possibility