removed link_pages function