factor out div wrap