some small problem with median