use mean instead of median