cleaned up code examples