updates to term_match and the standard library