cythonized version of CLIMF
merging