Filter implementation sketch