pairing algorithm for app academy