changes in home - refactoring code