refactor homecontroller/index