add code for generating initial match matrix