finished method for adding items to database