rename to addConnections and also declare it at the top of the current function scope (hoisting).