swig templating implemented