final refactoring update