converting pages to dynamic