refactoring and dogfooding