now handles page-breaks