Added changes for Multinomial version
adding the multinomial changes