remove redundant tanh function