better js code setting