Added sigmoid and improved convergence