replace by compiled swig