moved cython_wrapper into core