refactor next page