update territory_js