fixed the filterByValue method