Adding functionality to edit an item