added some stuff for mixture model fitting