handle item add & edit events