Added ensemble average method