MYLOC-107 - Modifying the filter to be a function