This sounds like something we could move into our utils