for reg code