[jh] further changes to group sum