Changes to sample code