Updated refactoring