Added in another version of location calculation.