refactor the page