add a logic for RandomNet