optimised load.js