Changed degree to total degree