added spatial filter