public String toString() {

        E el;
        // Search for maximum element length
        //		int maxlen = 0;
        //		int ellen;
        //
        //		for (int i = 0; i < array.getSize(); i++) {
        //			el = array.getElement(i);
        //			if (el != null) {
        //				ellen = el.toString().length();
        //				maxlen = ellen > maxlen ? ellen : maxlen;
        //			}
        //
        //		}

        // Set spacer length
        String space = "    ";
        String nullElemHolder = "....";
        String outFormat = "[%2s]";

        int index = 0;
        int layerIndex = 1;

        StringBuffer sb = new StringBuffer();

        while (layerIndex <= capacityLayers) {
            for (int i = 1; i < Math.pow(2, capacityLayers - layerIndex); ++i) {
                sb.append(space);
            }
            for (int i = index; i <= Math.pow(2, layerIndex) - 2; ++i) {
                el = array.getElement(i);
                if (el != null) {
                    // sb.append(el);
                    sb.append(String.format(outFormat, el.toString()));
                } else {
                    sb.append(nullElemHolder);
                }
                for (int k = 1; k < Math.pow(2, capacityLayers - layerIndex + 1); ++k) {
                    sb.append(space);
                }
            }

            sb.append("\n\n");
            ++layerIndex;
            index = (int) (Math.pow(2, layerIndex - 1) - 1);
        }


        return sb.toString();
    }