Updated code snippets in readme