added helper addSection function