take the best parts of multiple_pages branch