Added a function to compute median rmha values