This code up to function compute error works fine
Code works up to function estimate()
Code works up to function estimate()
Code works up to func estimate