regist function