Multinomial factor functions, preliminary implementation