adding function for large kx