refactoring (mostly intellij)