properly initialize regId