moving logic to locate network config and endpoint to a function
Merge pull request #104 from anuchandy/dev1

moving logic to locate network config and endpoint to a function