kappa implementation