filter an option tree