add scripts to swig templates for realtime