updated location functionality from an example
Merge remote-tracking branch 'origin'