Location update script fully working with API