Updating Filter example to use context.wait()