event on connect
onConnect event is hacky