First implementation of matching functionality

Dope stuff