Improved findConnections 

Added a helper method which allows findConnections to have a lot less repeated code.