whole distance is now properly summed