Maybe this block deserves its own utility function.
What do you think?