change GetLocation function