re-adding nnet code