refactor ipage