add search, may have bugs