switch sec 3 and 4; revise sec 6