dim=sum