Naive implementation of PCA