Might make more sense in a ```utils``` file if this was split off just to reuse on Marketplace.