added changes to getting location controller to work for sort