block must be a pure function or at least not use external random variables, otherwise fork could be broken