added avg & error