New DLL functions - kind of works now