public Node selectRandomNode(Node nodeIn) {
        List<Node> selectCollection = new ArrayList<Node>();
        if (nodeIn.getType() == NodeType.INPUT) {
            selectCollection.addAll(outNodes);
            selectCollection.addAll(hiddenNodes);
        } else if (nodeIn.getType() == NodeType.OUTPUT) {
            selectCollection.addAll(inNodes);
            selectCollection.addAll(hiddenNodes);
        } else if (nodeIn.getType() == NodeType.HIDDEN) {
            //selectCollection.addAll(inNodes);
            selectCollection.addAll(hiddenNodes);
            selectCollection.remove(nodeIn);
            selectCollection.addAll(outNodes);
        }
        int choosenIndex = -1;
        while (choosenIndex == -1 & !selectCollection.isEmpty()) {
            choosenIndex = getIndex4RandomOutNode(selectCollection, nodeIn);
        }
        if (choosenIndex == -1) {
            return nodeIn;
        } else {
            return selectCollection.get(choosenIndex);
        }
    }