resolve #15 add RayBuffer abstraction