basic bitap string matching algo