init sample code