moved location factory out of the results controller