fixed: from for-loop to using indexOf