edit sample method