made adjustments for cythonize to work properly