added variable max matches for testing