shouldn't have used arrIndexOf for string