SD-55978914-Refactor filtering