sample code correction