adding code for nn and pca