added code snippet in the readme.md