private Block getBottomRightBlock(Block block) {
        //check invariant
        if (block == null || block.getBlockID() == Block.NULL) {
            throw new RuntimeException("Invariant Violated: may not"
                    + "iterate for innermost block over a null instance of Block");
        }
        //returnblock = next deepest node on far right
        Block returnBlock = null;
        // find deepest node, that is, bottom most block in stack.
        returnBlock = getAfterBlock(block);
        if (returnBlock != null) {
            return getBottomRightBlock(returnBlock);
        }
        // move to the next socket in line:
        for (BlockConnector socket : block.getSockets()) {//assumes socket!=null
            Block socketBlock = getBlock(socket.getBlockID());
            if (socketBlock != null) {
                returnBlock = socketBlock;
            }
        }
        if (returnBlock != null) {
            return getBottomRightBlock(returnBlock);
        }
        //check invariant
        if (returnBlock != null) {
            throw new RuntimeException("Invariant Violated: may not "
                    + "return a null instance of block as the innermost block");
        }
        //If we can't traverse any deeper, then this is innermost Block.
        return block;
    }