added rounding to median result