update sample codes