fixed a bug, but still not converging