Use Contains() instead of IndexOf()