implemented softmax output layer