Added loop to matching engine