some important javascript changes