final draft, almost working match