Updated with median