Updating sample code