revise linear registration codes