This feels like a `util` function to me