build sample code