updated how items are added to the db