add example.js and improve README