changed getEphemMat to accept pointers