added softmax functionality