added PCA checking program, minor bugfixes