adds location functionality