my simplistic version of String matching