fixes some problems, uses tanh as activation function