updated class code