Benzothiazole and indole based dye sensor: Optical switching functions with pH stimuli