finales refactoring