added a search fn for assertion