added kmatch implementation
ported kmatch over from old project
first version of kmatch