Finished match2 with simple solution. Revised variables and comments for clarity.