minor refactoring in home controller