refactor duplicate page