Using affinity library