changed sample code.