code refactoring in view home.html