added function to build connection between modules based on xml file