make the search works for case sensitive or insensitive search