fast and working version of toy mcmc for categories