[minor] Allowing passing ns as parameter in filter function