Bug fix - if pairings is undefined, define it