changed place declaration of sum_err