rstimecourse2: added PCA algorithm