js improvement