Fixxes NN implementation.

+added plan b
+added NN
+added testing functionality