use separate call for on_connected event