added interface for string matching
validation routine rewritten - test cases added
in the process