In an exemplary method, a dielectric layer is deposited on a substrate. A masking layer is formed over a first region and a second region of the dielectric layer. The masking layer is made of an oxide of lanthanum. The masking layer is removed from the second region of the dielectric layer. A work function layer is formed directly on only the second region of the dielectric layer. The work function layer is made of titanium nitride that is formed by using a combination of titanium tetrachloride and ammonia (TiCl4/NH3).