working on filtering function debugging - seems like filtering is being called way too many times.