added location functionality