def find_substrings(target, length):
    """
    finds each substring of a given length in a sequence
    """
    sequence = target.seq
    L = len(sequence)

    allseqs = dict()

    if(L < length):
        return(sequence)
    else:
        for i in range(0, L-length):
            allseqs[str(i)] = str(sequence[i:i+length])

    return(allseqs)