replaced c_double with ctypes.c_double