changed tanh to sigmoid