Updated filter code.