Updated the add_item function