This method is getting a bit hairy with multiple conditionals for the different implementations. A future refactor might add a separate class for each implementation that doesn't have to care about the details of the other implementations.