finish turning geolocation code into C++