moved error stuff into calc_error