Update README.md

Format code and adapt README content to code sample