adding edit functionality