there already is a nanmedian section in line 190