median calculation update in Bipartite