implemented a random strategie for selecting nodes