adding string matching algorithm