Functionality before refactoring