adjusting sample code.