adding median filter as agent, works perfectly.