added code to add item and trigger.