@Override
    protected int determineBlockWidth() {

        //System.out.println("determining block width");

        int width = super.determineBlockWidth();

        //if the sum of bottom sockets is greater than the calculated width, then use it
        int bottomSocketWidth = 0;
        for (BlockConnector socket : block.getSockets()) {
            if (socket.getPositionType() == BlockConnector.PositionType.BOTTOM) {
                if (socket.getBlockID() == Block.NULL) {
                    //3 socket spacers = left of socket, between connectors, right of socket
                    bottomSocketWidth += BOTTOM_SOCKET_SIDE_SPACER;
                } else { //a block is connected to socket
                    //TODO get their assigned width from rb
                    if (rb.getSocketSpaceDimension(socket) != null) {
                        bottomSocketWidth += rb.getSocketSpaceDimension(socket).width;
                    }
                    bottomSocketWidth -= BlockConnectorShape.NORMAL_DATA_PLUG_WIDTH;
                    // if it's a mirror plug, subtract for the other side, too.
                    if (rb.getWorkspace().getEnv().getBlock(socket.getBlockID()).getPlug().getPositionType() == BlockConnector.PositionType.MIRROR) {
                        bottomSocketWidth -= BlockConnectorShape.NORMAL_DATA_PLUG_WIDTH;
                    }
                }
            }
        }


        bottomSocketWidth += 2 * BOTTOM_SOCKET_MIDDLE_SPACER;  //TODO need to decide for a size of the middle spacer and how to place them
        bottomSocketWidth += 2 * BOTTOM_SOCKET_SIDE_SPACER;

        if (bottomSocketWidth > width) {
            return (bottomSocketWidth + rb.accomodateLabelsWidth());
        }

        width += bottomSocketWidth;

        //make sure its even
        if (width % 2 == 1) {
            width++;
        }

        return width;
    }