adding code snippet to readme