add connect method and remove somebugs