fix: correct method of comparison filters, add unit tests