refactoring leftovers