add swig mode