modify sample code