updated code for LinuxGTM and Windows