updated filter code snippets