sample code fixes