add (and use) get_match_clause

typo 'loopup'