created module level methods for connect and disconnect