updated class snippet