global error formula added