cleaned up code examples a little