Implement edit functionality