added edit functionality