update README code examples and compatibility