refactoring that broke everything