update cython code but it is still not so fast because it acts on only a single site at a time