Adding the edit functionality