further improvements of mathcing engine