some work on ray.k