added error and connecting events