construct match using indexes instead of append in M; index into match in T