add connect method, remove debug output