Extended sample code