reorganized code
adding items: don't ignore existing id