pageBreak function modified