cluster and PCA analysis, bug fixes to MCMC