@SuppressWarnings("unused")
    private int getLayerFromIndex(final int index) {
        int layer = 0;
        while (index > Math.pow(2, layer) - 1) {
            layer++;
        }
        return layer;
    }