Try moving getAllConnections to aggregate.js