finishing intial version of filtering