sync with SWIG