change checkreg code