added location management code