optimize regsiter process