refactor home page