sample code completed