refactor pages using _data