…and as a general note in this algortihm: I think the way you're using foldr you're splitting the actions. That's something you **should not do**. In the end (either locally or broadcasted) you should either run **all** the actions or **none** of them.