added code snippet in readme.md