added clustering and derivation of representative principal components