move example out of index.js