extrace register logic