Reqriting regID functions