Added swig for templating