Reaction of NH3 with titania: N-doping of the oxide and TiN formation