made edit functionality