Added NN support
fixed NN