I think this function could use a better name. It's not, at least for me, obvious what it does.