prelim matching functions