added finite mixtures code