supports search with trailing spaces