show/hide sections appropriately