[enh] switched over to ctypes