javascript improve