tweaked js a little