speeding up valhook.js