adding node events for connect and disconnect