solved median