more work on cythonized code