add l2 regularization to the cost function.
add activation functions