implement some of the match API