refactoring top page