The mechanism of opening and closing of stomata in plants is based on