Added editItem function