add basic connection function