added code for string mactching