add #numger_of_pages and tests