updated swig integration