Implement sample editing