added avg, stddev, cleanup