worst export code ever written (windows only)