added location detection