Implemented autoMatch, but not debugged