Implement edit and delete