refactor page