work done by vjunet on checkEngagements and makeMatch