finish the revision of register main