implement NN and NN2opt experiment