test function for the matching engine