another kernel selection strategy: median

not yet tested but compiles fine