first version of memory match