sample code of Edison