code examples used