t8: modified javascript