-*-pa-*- overall distance calculation