Moving generate to PairGroup class