Attempting to use indexOf for items refe