make the sample code work