clarified mean and median calculations