Adding edit functionality