public String compress(String toBeCompressed){
        int length = toBeCompressed.length();
        ArrayList<Tag> ret = new ArrayList<>();
        Tag tempTag , charTag;
        for(int i = 0 ; i < length; i++){//main loop ->
            charTag = new Tag(0,0,toBeCompressed.charAt(i)); 
            for(int j = i -1 ; j >= 0 ; j--){//get best match <-
                if(toBeCompressed.charAt(i) == toBeCompressed.charAt(j)){
                    int jj = j+1 , ii = i+1;
                    for(; ii < length; ii++,jj++){//match jj-> ii->
                        char a = toBeCompressed.charAt(ii) ;
                        char b = toBeCompressed.charAt(jj) ;
                        if(b != a)
                            break;
                    }
                    int back = i - j , forward = jj - j;
                    char n = NULL;
                    if(ii < length-1)n = toBeCompressed.charAt(ii);
                    charTag = maxTag(charTag , new Tag(back,forward,n));
                }
            }
            i = i + charTag.getStepForward();
            ret.add(charTag);
        }
        return arrayListToString(ret);
    }