pi.js modified