Control of photochemical switching phenomena by chemical modification