updating code samples and syntax in README.md

updating code samples and syntax in README.md