Any reason not to just have headMat and faceMat local to this function as well?