re-factor 'match' methods