median problem solved