added Cython version
added C version