added softmax units, fixed derivatives