updated code for compilation with new swig files