manually modified javascript for future reference