solved median problem
solved mode problem