tweak register code example