correct sample code