finished edit functionality