update all sample code