fixing the even match analysis, adding tests for it