* @param distance the distance from sPos within its base
	 * @return the the pair pos for sPos.
	 */
	PairPos getPairPos( PairPos sPos, int distance )
    {
        int i = sPos.getIndex();
        // position with distance
        int pos = -sPos.getPosition();
        PairPos ePos = null;
        Pair p;
        do
        {
            p = pairs.get( i );
            if ( pos+p.length() < distance )
            {
                pos += p.length();
                int oldi = i;
                i = next( i+1, sPos.getBase() );
                if ( i == Integer.MAX_VALUE )
                {
                    ePos = new PairPos( oldi, p.length(), sPos.getBase() );
                    break;
                }
            }
            else
            {
                ePos = new PairPos( i, distance-pos, sPos.getBase() );
                break;
            }
        } while ( pos < distance );
        return ePos;
    }