added the possibility to ignore certain pairs