add codes and sample.