add search fn for region arrays
cleanup some dead stuff