updated code on Location