basics to the edit functionality