Working solver online. Need to add the error calculations.