Use String.contains(String) instead of checking for index