update documentation and sample