improved shared code examples