Changed NN to use double[][][]