Added the edit functionality