more scala like reimplementation of matchengine using matchers