current algorithm is good. next: implement it into C/OpenCL