refactoring home page