def tokens_to_ops(token_dict, fillunder=False):
    """returns a list of ops from a {tokenId:token_obj} dict

    if fillunder == True, drawsfilled cells underneath tokens"""
    outops = []
    for t in token_dict.values():
        outops.append(t.as_op())

        if fillunder:
            fillunder_op = {"id":"underfill", "type":"FillCells", "cellFills":[]}
            x, y = t.position
            for h in range(t.height):
                for w in range(t.width):
                    fillunder_op['cellFills'].append([[x+w, y+h], "#EEE"])
            outops.append(fillunder_op)
    return outops