a lot of things before refactoring