config & sample code