one pass of sec 3 and 4