modify sample testified register code