Refactored addItem to be simpler