minor updates to sample code