Added linkage calculation function