cython not working correctly