working in kappa functions