fixed removeSubMedian