added code to do PCA on environmental variables