Adding error evaluation code