improved sample code