move pages to the right place