improved javascript.