Added ha and facarry aggregation. Added distance calculation for generic fingerprint