It's a small stylistic nit, but I think this code would be more readable if you put a `return 0` after `items[item] = i + 1`. That would let you get rid of the else statement and remove a layer of nesting for the rest of the function.