Revise basic codes