Recommendations on territorial optimization of municipalities