refactoring with addition of final modifier