Simultaneous optimization of pits