both times you use "item", you should be using a variable name from one of your functions parameters instead