Optimizing photoelectrochemical properties of TiO2 by chemical codoping