updated PI.js with connections