lotta refactoring