add register code to class page