first version of SA based matching