Refactorized updated class