connect and packet stuff