trying to accelerate with cython, not woking really though