def findAll(haystack, needle):
    """returns a list of all occurances of needle in haystack"""
    h = haystack
    res = []
    f = haystack.find(needle)
    offset = 0
    while f >= 0:
        res.append(f + offset)
        offset += f + len(needle)
        h = h[f + len(needle):]
        f = h.find(needle)
    return res
