Updated sample codes.