added median filter and eval