rebuilding matchEngine class