Added reg init fxn-working