for user reg code