refactor HomeController