added pairing factory with a basic random algorithm