fix references
update plot function
change mean and median to meanC, medianC