added PCA and correct log scripts