javascript could have been much much worse