adding copy over from Kappa code