tirg almost working as DLL
sidestepped some problems with c_str()