this seems more like a "resolver" than a "factory"