Move matching logic in Connect