Where is this called from? Seems pretty opaque, and I wonder if there is a better way.