Add NN algorithm