affinity handling