add mean, median implementations