changed notation of weights from NN to W