start of the matching engine implementation