added method to wait for a ping and register node after that